OBJS := base.o motion.o display.o ekf.o simulator.o MarkerLocator.o iRobotSlam.o main.o
BIN_NAME = slam
CXX = g++
all: CXXFLAGS = -I. -O3 -g -D GUI
no_gui: CXXFLAGS = -I. -O3 -g

LIBS = -lopencv_core -lopencv_highgui -lopencv_calib3d -lopencv_imgproc

all: $(OBJS)
	$(CXX) $(CXXFLAGS) $(OBJS) -o $(BIN_NAME) $(LIBS)

no_gui: $(OBJS)
	$(CXX) $(CXXFLAGS) $(OBJS) -o $(BIN_NAME) $(LIBS)

%.o: %.cpp %.h
	$(CXX) -c $(CXXFLAGS) $< -o $@

clean:
	rm -f $(OBJS) $(BIN_NAME)
